<?php
/**
 * Autoload objects
 *
 */

function __autoload($class_name) {
	
	$parts = explode( '_', $class_name );
	$path = dirname(__FILE__).'/';
	for( $cont=0; $cont<count($parts); $cont++ )
	{	
		if( ($cont+1) < count($parts))
		{
			$path .= $parts[$cont];
		}
		else
		{
			$path .= 'class.'.$parts[$cont].'.php';
		}
	}
	require_once $path;
}
?>
